﻿using System;
using DBCodeBuilder.CodeGeneration.NHibernateCodeGeneration;
using DBCodeBuilder.Core.Classes;
using DBCodeBuilder.Core.Enum;
using DBCodeBuilder.Core.Interfaces;

namespace DBCodeBuilder.Core.Factories
{
    internal static class MapGeneratorFactory
    {
        public static IMappingGenerator GetMapGenerator(Orm codeForOrm)
        {
            switch (SessionInfo.Instance.OrmCodeGeneration)
            {
                case Orm.NHibernate:
                    return new NHibernateMappingGen();
                default:
                    throw new Exception("Unrecognized ORM for mapping generation.");
            }
        }
    }
}